package com.etc.controller;

import com.etc.pojo.EmpMst;
import com.etc.pojo.Result;
import com.etc.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@RestController
public class LoginController {

    @Autowired
    EmpService empService;


    @GetMapping("login")
    public Result login(EmpMst emp, HttpServletRequest request) {

        EmpMst empMst = empService.loginEmp(emp);

        return Result.ok("登录成功！", empMst);
    }

}
